@import "../common/mixin.scss";
@import "../common/var.scss";

/* common公共元素 */

//顶部栏
.common_head-bg {
    background: $bg-f2;
    border-bottom: 1px solid $border-gray;
}

.common_head {
    background: $bg-f2;
    height: 30px;
    @include center;
    a,
    p {
        display: block;
        color: $fc-gray;
        font-size: 12px;
    }
    a:hover {
        color: $fc-red;
    }
    .common_head-left {
        @include center-tb;
        p {
            margin-right: 34px;
        }
        a {
            margin-right: 20px;
        }
        .common_head-left-menu {
            position: relative;
            margin-left: 50px;
            p {
                line-height: 30px;
                margin: 0;
                padding: 0 10px;
                display: flex;
                align-items: center;
                i {
                    margin-left: 8px;
                    transition: all 0.3s;
                }
            }
            .common_head-left-menu-sub {
                display: none;
                position: absolute;
                top: 30px;
                width: 100%;
                padding-left: 10px;
                padding-top: 10px;
                box-sizing: border-box;
                background: $bg-white;
                border: 1px solid $border-gray;
                border-top: none;
                a {
                    margin-bottom: 8px;
                }
            }
            &:hover {
                background: $bg-white;
                p {
                    i {
                        transform: rotate(180deg);
                    }
                }
                .common_head-left-menu-sub {
                    display: block;
                }
            }
        }
    }
    .common_head-right {
        @include center-tb;
        a {
            padding-left: 14px;
            margin-left: 14px;
            border-left: 1px solid $fc-gray;
            &:first-child {
                border-left: none;
            }
        }
    }
}

//顶部搜索栏  全栈搜索
.common_head_search_global {
    display: flex;
    &>.logo {
        width: 240px;
        height: 96px;
        margin-right: 174px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    &>.search {
        margin-top: 27px;
        display: flex;
        margin-right: 30px;
        input {
            height: 32px;
            width: 373px;
            border: 2px solid $fc-red;
            text-indent: 15px;
            color: $fc-base;
            font-size: 12px;
        }
        button {
            width: 78px;
            height: 36px;
            background: $bg-red;
            color: $fc-white;
            font-size: 16px;
            border: none;
            cursor: pointer;
        }
    }
    &>.cart {
        margin-top: 27px;
        width: 138px;
        height: 34px;
        border: 1px solid $border-gray-dark;
        color: $fc-red;
        font-size: 12px;
        background: $bg-gray;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        i {
            margin-left: 4px;
        }
        p {
            position: absolute;
            width: 20px;
            height: 20px;
            line-height: 20px;
            text-align: center;
            top: -7px;
            right: -10px;
            color: $fc-white;
            background: $bg-red;
            border-radius: 50%;
        }
    }
}

//顶部搜索栏  店铺内的搜索栏
.common_head_search_shop {
    height: 96px;
    @include center;
    &>.left {
        height: 64px;
        display: flex;
        .left-logo {
            display: block;
            width: 238px;
            height: 64px;
            border-right: 1px solid #f0f0f0;
            display: flex;
            align-items: center;
            img {
                display: block;
            }
        }
        .left-title {
            padding: 0 10px;
            background-image: url(../img/dashed_f0.png);
            background-repeat: repeat-y;
            background-position: top right;
            &>p {
                font-size: 12px;
                color: $fc-base;
                padding-top: 12px;
                padding-bottom: 8px;
                text-align: center;
            }
            .left-title-oper {
                display: flex;
                &>p {
                    padding: 0 8px;
                    height: 20px;
                    display: flex;
                    align-items: center;
                    background: #e2a574;
                    line-height: 20px;
                    font-size: 12px;
                    color: $fc-white;
                    border-radius: 10px;
                    cursor: pointer;
                    i {
                        margin-right: 4px;
                    }
                }
                .left-title-oper-qq {
                    cursor: pointer;
                    margin-left: 10px;
                }
            }
        }
        .left-code {
            display: flex;
            .left-code-col {
                margin-left: 10px;
                p {
                    display: flex;
                    align-items: center;
                    font-size: 12px;
                    color: $fc-gray;
                    text-align: center;
                    margin-top: 12px;
                    i {
                        margin-left: 2px;
                    }
                }
            }
        }
    }
    &>.right {
        display: flex;
        input {
            width: 373px;
            height: 32px;
            border: 2px solid $border-red;
            border-right: none;
            text-indent: 15px;
            color: $fc-base;
            font-size: 12px;
        }
        button {
            width: 80px;
            height: 36px;
            border: none;
            display: block;
            font-size: 16px;
            color: $fc-white;
            cursor: pointer;
            &:nth-child(even) {
                background: $bg-red;
                margin-right: 5px;
            }
            &:nth-child(odd) {
                background: $fc-base;
            }
        }
        button:first-child {
            background: $bg-red;
        }
    }
}

//通用顶部导航栏
.comment_top_nav {
    display: flex;
    .comment_top_nav-left {
        width: 240px;
        height: 34px;
        background: $bg-red;
        position: relative;
        &>h1 {
            height: 34px;
            line-height: 34px;
            font-size: 14px;
            font-weight: bold;
            color: $fc-white;
            background: #d6002d;
            text-indent: 20px;
        }
        &:hover {
            .comment_top_nav-left-con-box {
                display: block;
            }
        }
        .comment_top_nav-left-con-box {
            overflow: hidden;
            position: absolute;
            left: 0;
            top: 34px;
            z-index: 100;
            background: $bg-red;
            display: none;
        }
        .comment_top_nav-left-con {
            padding: 0 20px;
            box-sizing: border-box;
            &>h1 {
                font-size: 14px;
                color: $fc-white;
                @include center-lr;
                padding-top: 16px;
                padding-bottom: 16px;
                font-weight: normal;
            }
            &>p {
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                border-bottom: 1px solid rgba(255, 255, 255, .3);
                &>a {
                    color: $fc-white;
                    font-size: 12px;
                    line-height: 1;
                    padding-bottom: 16px;
                    margin-right: 10px;
                    &:hover {
                        color: $fc-white;
                        text-decoration: underline;
                    }
                }
            }
        }
    }
    .comment_top_nav-right {
        width: 960px;
        &>ul {
            display: flex;
            &>li {
                line-height: 34px;
                padding: 0 24px;
                &>a {
                    color: $fc-base;
                    &:hover {
                        color: $fc-red;
                    }
                }
                &>.cur {
                    font-weight: bold;
                    color: $fc-red;
                }
            }
        }
    }
}

.comment_top_nav_bt {
    width: 100%;
    min-width: 1200px;
    height: 2px;
    background: $fc-red;
}

//通用 横屏通栏显示banner 图片高度450px
.comment_corss_banner-bg {
    height: 450px;
    background-position: center;
    .comment_corss_banner-img {
        overflow: hidden;
        position: relative;
        height: 450px;
        img {
            position: absolute;
            top: 0px;
            left: 50%;
            margin-left: -960px;
            display: block;
        }
    }
}

//商品页 顶部通栏显示的带logo的banner
.common_logobanner-bg {
    height: 115px;
    background-position: center;
    .common_logobanner-img {
        overflow: hidden;
        position: relative;
        height: 115px;
        img {
            position: absolute;
            top: 0px;
            left: 50%;
            margin-left: -960px;
            display: block;
        }
    }
}

//商品页顶部导航
.common_goods_nav-bg {
    background: $bg-black;
}

.common_goods_nav {
    background: $bg-black;
    ul {
        display: flex;
        padding-left: 40px;
        li {
            margin-right: 46px;
            a {
                display: block;
                line-height: 36px;
                color: $fc-white;
                padding: 0 10px;
            }
        }
    }
}

//路径导航
.common_crumb {
    ul {
        display: flex;
        li {
            font-size: 12px;
            color: $fc-title-gray;
            line-height: 1;
            display: flex;
            a,
            span {
                font-size: 12px;
                color: $fc-title-gray;
                line-height: 1;
            }
            span {
                margin: 0 8px;
            }
            a {
                max-width: 120px;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                display: block;
            }
        }
    }
}

//页脚
.common_footer-bg {
    background: #f8f8f8;
}

.common_footer {
    background: #f8f8f8;
    .common_footer-top {
        display: flex;
        justify-content: space-around;
        padding-top: 40px;
        padding-bottom: 36px;
        border-bottom: 1px solid $border-gray-dark;
        .common_footer-top-col {
            display: flex;
            img {
                margin-right: 16px;
            }
            .common_footer-top-col-text {
                h1 {
                    color: #353535;
                    font-size: 16px;
                    padding-bottom: 12px;
                }
                p {
                    font-size: 14px;
                    color: #656565;
                }
            }
        }
    }
    .common_footer-body {
        padding-top: 38px;
        display: flex;
        padding-bottom: 60px;
        .common_footer-body-left {
            border-right: 1px solid $border-gray-dark;
            @include center-lr;
            width: 928px;
            box-sizing: border-box;
            padding-right: 90px;
            dt {
                font-size: 16px;
                color: #646464;
                font-weight: bold;
                line-height: 1;
                padding-bottom: 20px;
            }
            dd {
                padding-bottom: 18px;
                a {
                    font-size: 12px;
                    color: #8b8b8b;
                    line-height: 1;
                }
            }
        }
        .common_footer-body-right {
            width: 272px;
            h1 {
                font-size: 16px;
                color: #646464;
                text-align: center;
                line-height: 1;
                padding-top: 4px;
                padding-bottom: 12px;
            }
            img {
                width: 90px;
                height: 90px;
                display: block;
                margin: 0 auto;
            }
        }
    }
    .common_footer-foot {
        padding-bottom: 35px;
        p {
            text-align: center;
            font-size: 12px;
            color: $fc-gray;
        }
    }
}

// 商品列表
.base-pro-list {
    display: flex;
    flex-wrap: wrap;
}

// 商品列表-单个项
.base-pro-item-wrap {
    border: 1px solid $border-gray;
    width: 212px;
    // height: 368px;
    padding: 4px;
    margin: 0 20px 20px 0;
    &:nth-child(5n) {
        margin-right: 0;
    }
    .img-wrap {
        width: 214px;
        height: 274px;
        display: flex;
        justify-content: center;
        align-items: center;
        img {
            max-width: 100%;
            max-height: 100%;
        }
    }
    .info-wrap {
        position: relative;
        padding: 19px 5px 29px 5px;
        .line1 {
            display: flex;
            align-items: center;
        }
        .unit {
            font-size: 14px;
            color: $fc-red;
        }
        .price {
            font-size: 20px;
            color: $fc-red;
        }
        .tag {
            background-color: #ffeeee;
            border: 1px solid $border-red;
            font-size: 12px;
            color: #ff5175;
            width: 38px;
            text-align: center;
            display: inline-block;
            line-height: 14px;
            margin-left: 5px;
        }
        .title {
            font-size: 12px;
            color: $fc-base;
            margin-top: 14px;
            width: 165px;
            @include ellipsis;
        }
        .cart-wrap {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            position: absolute;
            right: 12px;
            top: 19px;
            background-color: $bg-red;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
        }
    }
}

// 分类筛选
.cate-shaixuan-wrap {
    border: 1px solid #e6e2e1;
    .cate-shaixuan-item-wrap {
        display: flex;
        border-bottom: 1px dashed #e6e2e1;
        overflow: hidden;
        // height: 36px;
        font-size: 12px;
        &:last-child {
            border-bottom: 0;
        }
        .cate-left {
            background-color: #f7f5f5;
            color: #b0a59f;
            line-height: 36px;
            width: 92px;
            text-align: center;
        }
        .cate-right {
            display: flex;
            justify-content: space-between;
            width: 1106px;
            color: #806f66;
            .item-list {
                display: flex;
                flex-wrap: wrap;
                width: 1026px;
                &.h36 {
                    height: 36px;
                }
            }
            .item {
                padding: 0 20px;
                line-height: 36px;
                cursor: pointer;
                &:hover {
                    color: $fc-red;
                }
            }
            .more {
                display: flex;
                align-items: center;
                height: 36px;
                margin-right: 16px;
                cursor: pointer;
                i {
                    margin-left: 4px;
                }
            }
        }
    }
}

// 排序
.paixu-wrap {
    padding: 7px 11px;
    display: flex;
    justify-content: space-between;
    border: 1px solid #e6e2e1;
    margin: 10px 0 12px 0;
    background-color: #faf9f9;
    .paixu-left {
        display: flex;
    }
    .paixu-items-wrap {
        display: flex;
        background-color: #FFF;
        .item {
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 12px;
            color: $fc-base;
            width: 68px;
            line-height: 23px;
            border: 1px solid #e6e2e1;
            cursor: pointer;
            &.active {
                color: #fff;
                background-color: $bg-red;
                border-color: $border-red;
            }
            i {
                margin-bottom: 2px;
                margin-left: 2px;
            }
        }
    }
    .price-wrap {
        display: flex;
        align-items: center;
        color: $fc-gray;
        font-size: 12px;
        margin-left: 30px;
        .input-wrap {
            border: 1px solid #e6e2e1;
            padding: 0 12px;
            background-color: #FFF;
            input {
                height: 23px;
                width: 36px;
            }
        }
        .gang {
            color: $fc-base;
            margin: 0 8px;
        }
    }
    .page-wrap {
        display: flex;
        align-items: center;
        .page-num {
            margin-right: 12px;
        }
        .arr-wrap {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 48px;
            height: 23px;
            border: 1px solid #e6e2e1;
            background-color: #fff;
            cursor: pointer;
            &.disabled {
                background-color: #efefef;
            }
        }
    }
}

// 分页
.page-bar {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-align: right;
    padding: 60px 0;
    li {
        list-style: none;
        display: inline-block;
        background-color: #f7f7f7;
        margin-left: 5px;
        border: 1px solid $border-gray;
        height: 38px;
        &:first-child>a {
            margin-left: 0px;
        }
    }
    a {
        text-decoration: none;
        position: relative;
        float: left;
        padding: 0 15px;
        line-height: 38px;
        margin-left: -1px;
        color: $fc-base;
        font-size: 14px;
        cursor: pointer;
        &:hover {
            background-color: #eee;
        }
    }
    .active {
        border: 0;
        a {
            color: $fc-red;
            cursor: default;
            background-color: #fff;
        }
    }
    i {
        font-style: normal;
        color: #d44950;
        margin: 0px 4px;
        font-size: 12px;
    }
    .page-button-disabled {
        color: #ddd !important;
    }
    input {
        border: 1px solid #dddddd;
        width: 26px;
    }
    .page-info {
        line-height: 38px;
        vertical-align: 14px;
        background-color: #fff;
        margin-left: 28px;
        border: 0;
        input {
            width: 36px;
            line-height: 38px;
            text-align: center;
            border: 1px solid $border-gray;
            margin: 0 6px;
        }
    }
}

// 全球购-分类筛选
.cate-type-wrap {
    .item {
        width: 120px;
        line-height: 40px;
        font-size: 14px;
        color: $fc-title-gray;
        background-color: #f0f0f0;
        display: inline-block;
        margin-right: 20px;
        text-align: center;
        &.active {
            background-color: $bg-red;
            color: #fff;
        }
    }
}

// 店铺优惠券-列表
.shop-coupon-list {
    display: flex;
    flex-wrap: wrap;
    margin: 30px 0 23px 0;
}

// 店铺优惠券-单项
.shop-coupon-wrap {
    margin-right: 20px;
    position: relative;
    display: flex;
    background-color: #ffa545;
    color: #ffffff;
    width: 375px;
    height: 158px;
    .coupon-bod {
        position: absolute;
        top: 0;
        bottom: 0;
        &.left {
            left: -7px;
        }
        &.right {
            right: -7px;
        }
        li {
            background-color: #fff;
            width: 15px;
            height: 15px;
            border-radius: 50%;
            margin-top: 10px;
        }
    }
    .coupon-info {
        padding: 28px 0 0 22px;
        position: relative;
        font-size: 12px;
        .expiredate {
            font-size: 14px;
        }
        .price-wrap {
            width: 274px;
            display: flex;
            flex-direction: row;
            .unit {
                font-size: 36px;
            }
            .price {
                font-size: 90px;
                margin-top: -14px;
                margin-right: 12px;
            }
            .title {
                font-size: 28px;
                margin-top: 14px;
            }
            .condition {
                background-color: #ffd2a2;
                color: #a55500;
                font-size: 16px;
                line-height: 24px;
                padding: 0 7px;
                border-radius: 3px;
            }
        }
    }
    .coupon-state {
        width: 90px;
        position: relative;
        cursor: pointer;
        &:before {
            content: '';
            position: absolute;
            left: 0;
            top: 20px;
            bottom: 20px;
            border-left: 1px dashed #fff;
        }
        p {
            width: 24px;
            line-height: 28px;
            display: flex;
            align-items: center;
            height: 100%;
            margin: 0 auto;
            font-size: 24px;
        }
    }
}

//上传图片
.common_upimg-box {
    display: flex;
    margin-right: -10px;
    flex-wrap: wrap;
    .common_upimg {
        width: 80px;
        height: 80px;
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: center;
        box-sizing: border-box;
        margin-right: 10px;
        margin-bottom: 10px;
        &:hover {
            border: 1px solid $border-red;
        }
        &>img {
            width: 100%;
        }
        &>input {
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
            position: absolute;
            top: 0px;
            left: 0px;
        }
        .common_upimg-remove {
            cursor: pointer;
            position: absolute;
            top: 5px;
            right: 5px;
            width: 20px;
            height: 20px;
            background: #ff0036;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            &>div {
                width: 70%;
                height: 2px;
                background: #fff;
            }
        }
    }
}

//上传头像
.common_logo-box {
    display: flex;
    margin-right: -10px;
    flex-wrap: wrap;
    .common_logo {
        width: 139px;
        height: 139px;
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: center;
        box-sizing: border-box;
        margin-right: 10px;
        margin-bottom: 10px;
        &>img {
            width: 100%;
        }
        &>input {
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
            position: absolute;
            top: 0px;
            left: 0px;
        }
        .common_upimg-remove {
            cursor: pointer;
            position: absolute;
            top: 5px;
            right: 5px;
            width: 20px;
            height: 20px;
            background: #ff0036;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            &>div {
                width: 70%;
                height: 2px;
                background: #fff;
            }
        }
    }
}